import mdItCustomAttrs  from 'markdown-it-custom-attrs'
import { mdPlugin } from './config/plugins'

import navData from './nav.js'
import {
    leafletSidebar,
    olSidebar,
    mapboxSidebar,
} from './sidebar.js'

export default {
    markdown:{
        config: (md) => {
          md.use(mdItCustomAttrs, 'image', {
            'data-fancybox': "gallery"
          })
          mdPlugin(md)
        }
    },
    title: 'LZUGIS示例中心',
    description: 'LZUGIS示例中心',
    lang: 'zh-CN',
    base: '/sdk-examples/',
    head: [
        // 添加图标
        ['link', { rel: 'icon', href: '/logo.png' }],
        ["link", { rel: "stylesheet", href: "/lib/fancybox.css" }],
        ["script", { src: "/lib/fancybox.umd.js" }],
        // ["script", { src: "https://lbs.sf-express.com/api/map?v=2.0&ak=554e42802f604c35b8afa2de864c55cb" }]
        ["script", { src: "https://lbs.sf-express.com/api/map?v=3.0&ak=554e42802f604c35b8afa2de864c55cb" }],
    ],
    themeConfig: {
        // 网站 logo
        logo: '/logo.png',
        // 网站标题
        siteTitle: 'LZUGIS示例中心',
        // 启动页面丝滑滚动
        smoothScroll: true,
        // 社交账户链接
        socialLinks: [
            {
                icon: {
                    svg: '<svg t="1698452024849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4014" width="128" height="128"><path d="M512 0c282.784 0 512 229.216 512 512s-229.216 512-512 512S0 794.784 0 512 229.216 0 512 0z m189.952 752l11.2-108.224c-31.904 9.536-100.928 16.128-147.712 16.128-134.464 0-205.728-47.296-195.328-146.304 11.584-110.688 113.152-145.696 232.64-145.696 54.784 0 122.432 8.8 151.296 18.336L768 272.704C724.544 262.24 678.272 256 599.584 256c-203.2 0-388.704 94.88-406.4 263.488C178.336 660.96 303.584 768 535.616 768c80.672 0 138.464-6.432 166.336-16z" fill="#CE000D" p-id="4015"></path></svg>'
                },
                link: 'https://blog.csdn.net/GISShiXiSheng?type=blog'
            }
        ],
        // 导航栏配置
        nav: navData,
        // 左侧边栏配置
        sidebar: {
            '/leaflet/': leafletSidebar,
            '/ol/': olSidebar,
            '/mapbox/': mapboxSidebar,
        },
        // 右侧边栏标题
        outline: 'deep', // [2, 5]
        outlineTitle: '目录',
        // 上下篇文本提示文字
        docFooter: {
            prev: '←上一篇',
            next: '下一篇→'
        },
        // 上次更新时间提示文字
        lastUpdatedText: '上次更新时间',

        // 编辑链接
        // editLink: {
        //     text: '我的博客',
        //     pattern: 'https://www.csdn.net/'
        // },

        // 页面底部
        footer: {
            message: '',
            copyright: `Copyright © ${new Date().getFullYear()} LZUGIS`
        }
    }
}
